package com.qf.controller;

import com.github.pagehelper.PageHelper;
import com.qf.commns.DataResult;
import com.qf.pojo.Owner;
import com.qf.service.OwnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("owner")
public class OwnerController {
    @Autowired
    private OwnerService service;
    @RequestMapping("/table/list")
    public DataResult tablePageList(){
        List<Owner> list = service.findPageOwner();
        DataResult dr = new DataResult();
        dr.setCode(0);
        dr.setCount(list.size());
        dr.setData(list);
        dr.setMsg("");
        return dr;
    }

}
